import React from 'react';
import { Tabs } from 'antd';
import './style.scss';

import SynonymWord from './SynonymWord';
import Atomic from './AtomicWord';
import ParentWord from './ParentWord';

const { TabPane } = Tabs;

/**
 * 基础词库
 * 示例： AI管理-机器人管理-版本管理-配置话术流程-基础词库
 */
const BasicWordLibrary: React.FC<{ versionId: number }> = props => {
  const { versionId } = props;

  // 词类类型 0--近义词 1--词组词 2--专业词
  // const [wordClassType, setWordClassType] = useState<string>("0");

  const callback = (key: string) => {
    // setWordClassType(key);
  };

  return (
    <>
      <Tabs onChange={callback} type="card" className="tabs-content">
        <TabPane tab="同义词" key="0">
          <SynonymWord versionId={versionId} />
        </TabPane>

        <TabPane tab="词组" key="1">
          <ParentWord versionId={versionId} />
        </TabPane>
        <TabPane tab="专业词" key="2">
          <Atomic versionId={versionId} />
        </TabPane>
      </Tabs>
    </>
  );
};

export default BasicWordLibrary;
